<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="/js/jquery-1.10.1.js"></script>
<script>
/*    var a = '${stu.sex}' 
   $(document).ready(function(){
	   $("#sex").val(a)
   }) */
   var msg = '${msg}';
   if (msg) {
	   alert(msg)
   }
</script>
</head>
<body>
    private String sname;
    private Integer id;
    private Date birthday;
    private String sex;
    <form action="/student/update.action">
        <input name="sname" value="${stu.sname}" />
         <input value="${stu.id}" disabled="disabled" />
         <input value="${stu.version}"  style="display:none" name="version" />
         <input name="id" value="${stu.id}" style="display:none" />
         <input name="birthday" value="${stu.birthdayStr}" />
        <select name="sex" id="sex">
	        <option value="0">---</option>
	        <option value="男" ${stu.sex == '男'? 'selected': ''}>男</option>
	        <option value="女" ${stu.sex == '女'? 'selected': ''}>女</option>
	    </select>
	    <button>更新</button>
    </form>
</body>
</html>